function androidTextCode(cache) {
  let code = `
        <TextView
    `;
  strings.push(cache.data.content);

  let data = cache.data;
  const { font, width, height, id, opacity } = data;
  const { content, styles } = font;

  let toolsText = "";
  let ref = "";
  let textColor = "";
  let size = `${textUnit(num(font.size))}`;
  let fontWeight = "normal";
  let italic = "";
  let textId = "";

  for (let i = 0; i < styles.length; i++) {
    let style = styles[i];
    let color = rgbaToHex(style.color.value);

    let text = genStringXml(style.content);
    if (ref.length == 0) {
      ref = text.ref;
    }
    if (textColor.length == 0) {
      textColor = color;
    }
    toolsText += style.content;

    if (font.font.includes("Medium") || font.font.includes("Semibold")) {
      fontWeight = "500";
    } else if (font.font.includes("Bold")) {
      fontWeight = "bold";
    }
    if (font.font.includes("Italic")) {
      italic = "|italic";
    }

    if (textId.length == 0) {
      textId = "tv" + ref;
    }
  }

  idsMap["" + id] = textId;

  code += `
            android:id="@+id/${textId}"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="${ref}"
            android:textSize="${size}"
            android:textColor="${textColor}"
            android:textStyle="${fontWeight}${italic}"
            tools:text="${toolsText}"
        `;

  if (cache.attrs) {
    for (var i = 0; i < cache.attrs.length; i++) {
      var attr = cache.attrs[i];
      code += attr + "\n";
    }
  }

  code += ` />`;

  return code;
}
